Text Analytics Library Objects
This topic provides information about the Text Analytics library functions using the Microsoft Text Analytics service.
For more information about working with the Microsoft Text Analytics, see Using Text Analytics Functions.
Microsoft Text Analytics
Microsoft Text Analytics Library uses Microsoft’s Text Analytics service that allows natural language processing over input text and provide Sentiment Analysis, Entity Recognition, and Key Phrase Extraction functions.
The business entities of Microsoft Text Analytics are exposed under Business Entities > Library Types > MS Text Analytics.
The functions and events are exposed under Project > References > Library References > Direct.TextAnalytics.Library > MS Text Analytics.
Prerequisites
An active Microsoft Azure account. If you do not have an account, use Create Microsoft Azure account to create an account.
An active internet connection on your machine.
The API key and End Point for a Text Analysis resource. Create an instance of MS Client Credential, and enter the API key, the End Point, and the Timeout value.
If the Timeout value is entered as 0 seconds, then the system will use the default value as 30 seconds.
Microsoft Endpoints are specific to region. See Microsoft Endpoints to find the endpoint for your region.
See Language list for the languages supported for each function.
See Data Limits for character restrictions and usage limits on MS Text Analytics functions

Recognizes the named entities present in the input text. Assign the output of this function to MS Entity Response object.
Parameter | Input | Description |
---|---|---|
MS Client Credential |
- |
MS Client Credential object that contain the API Key and End Point. |
Language Code |
Text |
Code of the language of the input text. See the Language list and code for the supported languages in this function. |
Input Text |
Text |
Text for entity recognition. |
To perform further analysis on the recognized entities, create an instance of MS Entity and MS Match Record each, and use the returned data present in the respective variables of the instances created.
Returns
Returns the recognized entities as list of MSEntity. See Entity Recognition in Text Analytics.

Analyzes the input text and returns a sentiment score. The sentiment score ranges from 0 (negative) to 1 (positive). Assign the output of this function to MS Sentiment Response object.
Parameter | Input | Description |
---|---|---|
MS Client Credential |
- |
MS Client Credential object that contain the API Key and End Point. |
Language Code |
Text |
Code of the language of the input text. See the Language list and code for the supported languages in this function. |
Input Text |
Text |
Text for sentiment analysis. |
Returns
Returns the sentiment score as decimal.

Extracts the key phrases present in the input text. Assign the output of this function to MS Key Phrase Response object.
Parameter | Input | Description |
---|---|---|
MS Client Credential |
- |
MS Client Credential object that contain the API Key and End Point. |
Language Code |
Text |
Code of the language of the input text. See the Language list and code for the supported languages in this function. |
Input Text |
Text |
Text for key phrase extraction. |
Returns
Returns the extracted phrases as list of MS Key Phrase.